/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.tces.view;

import com.opensymphony.xwork2.ActionContext;
import com.tces.model.Role;
import com.opensymphony.xwork2.ActionSupport;
import com.tces.controller.RoleDAO;
import com.tces.model.User;
import java.util.List;
import org.apache.log4j.Logger;

/**
 *
 * @author arnolda
 */
public class RoleAction  extends ActionSupport {

    private static final Logger log = Logger.getLogger(RoleAction.class);
    private User user;
    private List<Role> roleList;

    @Override
    public String execute() {
        try {
            user = (User) ActionContext.getContext().getSession().get("user");
            roleList=RoleDAO.findAll();
        } catch (Exception ex) {
            log.error(ex);
        }
        return SUCCESS;
    }

    public List<Role> getRoleList() {
        return roleList;
    }

    public void setRoleList(List<Role> roleList) {
        this.roleList = roleList;
    }

    
}
